export const email = /^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/;
export const phone = /^1\d{10}$/;
export const emailOrPhone = /(^1\d{10}$)|(^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$)/;
export const password = /^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{6,16}$/;
export const userName = /^([A-Za-z]|[\u4E00-\u9FA5])+$/i;
export const trim = /^\S+(\s+\S+)*$/;


export const regRules = {
  IDCard: { // /(^([0-9]{17}[0-9X]{1})$)/
      pattern:/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
      message:'身份证号填写有误!'
  },
  cnAndEn: {
    pattern: /^[\u4e00-\u9fa5a-zA-Z]{2,20}$/,
    message: '请输入中文、英文，2-20个字符'
  },
}
